package ym.ecrm.core.domain.financeManagement;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import ym.ecrm.core.domain.base.BaseEntity;
import ym.ecrm.core.domain.systemManagement.Organization;
import ym.ecrm.core.domain.systemManagement.User;

/**
 * 管理费支出类
 * @author fage
 *@version 1.0
 */
@Entity
@Table(name = "t_manageExpense")
public class ManageExpense extends BaseEntity {

	/**
	 * expenseCode 支出编号
	 */
	private String expenseCode;
	/**
	 * department 支出部门
	 */
	@ManyToOne(targetEntity = Organization.class
			, cascade = {CascadeType.PERSIST, CascadeType.MERGE })
	@JoinColumn(name = "organizationId")
	private Organization  department;
	/**
	 * data 日期
	 */
	private String data;
	/**
	 * sum 金额
	 */
	private String sum;
	/**
	 * reason 事由
	 */
	private String reason;
	/**
	 * user 经手人
	 */
	@ManyToOne(targetEntity = User.class
			, cascade = {CascadeType.PERSIST, CascadeType.MERGE })
	@JoinColumn(name = "userId")
	private User user;
	
	
	
	public String getExpenseCode() {
		return expenseCode;
	}
	public void setExpenseCode(String expenseCode) {
		this.expenseCode = expenseCode;
	}
	
	public Organization getDepartment() {
		return department;
	}
	public void setDepartment(Organization department) {
		this.department = department;
	}
	public String getData() {
		return data;
	}
	public void setData(String data) {
		this.data = data;
	}
	public String getSum() {
		return sum;
	}
	public void setSum(String sum) {
		this.sum = sum;
	}
	public String getReason() {
		return reason;
	}
	public void setReason(String reason) {
		this.reason = reason;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
	
	
}
